﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework.Input;

namespace FIM
{
    public class Key : SingleInput
    {
        public override bool IsPressed
        {
            get { return IsDown && manager.PreviousKeyboard.IsKeyUp(key); }
        }
        public override bool IsReleased
        {
            get { return IsUp && manager.PreviousKeyboard.IsKeyDown(key); }
        }
        public override bool IsDown
        {
            get { return manager.CurrentKeyboard.IsKeyDown(key); }
        }
        public override bool IsUp
        {
            get { return manager.CurrentKeyboard.IsKeyUp(key); }
        }
        public override float Value
        {
            get { return IsDown ? 1 * mul : 0; }
        }
        Keys key;

        public Key(CManager inputManager, Keys theKey)
            : this(inputManager, 1, theKey) { }

        public Key(CManager inputManager, float multiplier, Keys theKey)
            : base(inputManager, multiplier)
        {
            key = theKey;
        }
    }
}
